<?php /* Smarty version Smarty-3.0.7, created on 2014-08-23 00:30:54
         compiled from "E:\project\xampp\htdocs\farmonline\code/themes/prestashop/order-payment.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1580853f77e4ec898a9-78834581%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'e43161b7d465ba8a5b7c89c7d67c9d5ae599ff5d' => 
    array (
      0 => 'E:\\project\\xampp\\htdocs\\farmonline\\code/themes/prestashop/order-payment.tpl',
      1 => 1408289396,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1580853f77e4ec898a9-78834581',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>

<?php if ($_smarty_tpl->getVariable('opc')->value){?>
	<?php $_smarty_tpl->tpl_vars["back_order_page"] = new Smarty_variable("order-opc.php", null, null);?>
<?php }else{ ?>
	<?php $_smarty_tpl->tpl_vars["back_order_page"] = new Smarty_variable("order.php", null, null);?>
<?php }?>
<?php if (!$_smarty_tpl->getVariable('opc')->value){?>
	<script type="text/javascript">
	// <![CDATA[
	var currencySign = '<?php echo html_entity_decode($_smarty_tpl->getVariable('currencySign')->value,2,"UTF-8");?>
';
	var currencyRate = '<?php echo floatval($_smarty_tpl->getVariable('currencyRate')->value);?>
';
	var currencyFormat = '<?php echo intval($_smarty_tpl->getVariable('currencyFormat')->value);?>
';
	var currencyBlank = '<?php echo intval($_smarty_tpl->getVariable('currencyBlank')->value);?>
';
	var txtProduct = "<?php echo smartyTranslate(array('s'=>'product'),$_smarty_tpl);?>
";
	var txtProducts = "<?php echo smartyTranslate(array('s'=>'products'),$_smarty_tpl);?>
";
	// ]]>
	</script>

	<?php ob_start(); ?><?php echo smartyTranslate(array('s'=>'Your payment method'),$_smarty_tpl);?>
<?php  Smarty::$_smarty_vars['capture']['path']=ob_get_clean();?>
	<?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_dir')->value)."./breadcrumb.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>
<?php }?>

<?php if (!$_smarty_tpl->getVariable('opc')->value){?><h1><?php echo smartyTranslate(array('s'=>'Choose your payment method'),$_smarty_tpl);?>
</h1><?php }else{ ?><h2>3. <?php echo smartyTranslate(array('s'=>'Choose your payment method'),$_smarty_tpl);?>
</h2><?php }?>

<?php if (!$_smarty_tpl->getVariable('opc')->value){?>
	<?php $_smarty_tpl->tpl_vars['current_step'] = new Smarty_variable('payment', null, null);?>
	<?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_dir')->value)."./order-steps.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>

	<?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_dir')->value)."./errors.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>
<?php }else{ ?>


	<div id="opc_payment_methods" class="opc-main-block">
		<div id="opc_payment_methods-overlay" class="opc-overlay" style="display: none;"></div>
<?php }?>
<form  action="<?php echo $_smarty_tpl->getVariable('link')->value->getPageLink($_smarty_tpl->getVariable('back_order_page')->value,true);?>
" method="post">
<div id="HOOK_TOP_PAYMENT"><?php echo $_smarty_tpl->getVariable('HOOK_TOP_PAYMENT')->value;?>
</div>
<?php if ($_smarty_tpl->getVariable('HOOK_PAYMENT')->value){?>
	<?php if (!$_smarty_tpl->getVariable('opc')->value){?><h4><?php echo smartyTranslate(array('s'=>'Please select your preferred payment method to pay the amount of'),$_smarty_tpl);?>
&nbsp;<span class="price"><?php echo Product::convertPrice(array('price'=>$_smarty_tpl->getVariable('total_price')->value),$_smarty_tpl);?>
</span> <?php if ($_smarty_tpl->getVariable('taxes_enabled')->value){?><?php echo smartyTranslate(array('s'=>'(tax incl.)'),$_smarty_tpl);?>
<?php }?></h4><br /><?php }?>
	<?php if ($_smarty_tpl->getVariable('opc')->value){?><div id="opc_payment_methods-content"><?php }?>
		<div id="HOOK_PAYMENT">
	

				<h1>THANH TOÁN</h1>
				<div class="title_1">
					<span>VUI LÒNG CHỌN PHƯƠNG THỨC THANH TOÁN BẠN MONG MUỐN</span>
				</div>
				<!-- PANEL -->
				<div class="panel_checkout_wapper">
					<div class="panel_checkout_title">
						<span><input type="radio" name="choose_payment" value="1" checked>Thanh toán khi nhận hàng (COD)</span>
					</div>
					<div class="panel_checkout_content">
						<table>
							<tbody>
								<tr>
									<td class="left_table">Ghi chú cho nhân viên giao hàng 
										<small>(Không bắt buộc)</small></td>
									<td class="right_table"><input type="text" name="message_update" value="" placeholder="VD : Gặp chị Hoa nhận tiền"></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<!-- END PANEL -->

				<!-- PANEL -->
				<div class="panel_checkout_wapper">
					<div class="panel_checkout_title">
						<span><input type="radio" name="choose_payment" value="2">Chuyển khoản nhanh (Internet banking, SMS banking, ATM Transfering)</span>
					</div>
					<div class="panel_checkout_content">
						<table>
							<tbody>
								<tr>
									<td class="left_table">Chọn ngân hàng bạn mong muốn</td>
									<td class="right_table">
										<select name="id_bankwire">
										
											<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('listAccount')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
?>
												<option value="<?php echo $_smarty_tpl->tpl_vars['value']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['value']->value['name_bank'];?>
</option>
											<?php }} ?>
										</select>
									</td>
								</tr>
								<tr>
									<td style="text-align: right;vertical-align: text-top;">
										<img src="<?php echo $_smarty_tpl->getVariable('base_dir')->value;?>
img/alert_transfer.png" alt="" style="margin-top:14px">
									</td>
									<td>
										<ul class="info_details">
											<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('listAccount')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
?>
												<li class="info_<?php echo $_smarty_tpl->tpl_vars['value']->value['id'];?>
">
												<p class="alert_transfer">
														Bạn vui lòng chuyển tiền vào : <br>
														Tài khoản : <?php echo $_smarty_tpl->tpl_vars['value']->value['number_bank'];?>
 <br>
														Tên : <?php echo $_smarty_tpl->tpl_vars['value']->value['name'];?>
<br>
														Ngân hàng : <?php echo $_smarty_tpl->tpl_vars['value']->value['name_bank'];?>

												</p>
												</li>
											<?php }} ?>
											
										</ul>
										
										
										
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<!-- END PANEL -->

		
		</div>
	<?php if ($_smarty_tpl->getVariable('opc')->value){?></div><?php }?>
<?php }else{ ?>
	<p class="warning"><?php echo smartyTranslate(array('s'=>'No payment modules have been installed.'),$_smarty_tpl);?>
</p>
<?php }?>

<?php if (!$_smarty_tpl->getVariable('opc')->value){?>
<p class="cart_navigation ">
		<input type="hidden" class="hidden" name="step" value="4" />
		<input type="hidden" name="back" value="<?php echo $_smarty_tpl->getVariable('back')->value;?>
" />
		<a href="<?php echo $_smarty_tpl->getVariable('link')->value->getPageLink($_smarty_tpl->getVariable('back_order_page')->value,true);?>
?step=2<?php if ($_smarty_tpl->getVariable('back')->value){?>&back=<?php echo $_smarty_tpl->getVariable('back')->value;?>
<?php }?>" title="<?php echo smartyTranslate(array('s'=>'Previous'),$_smarty_tpl);?>
" class="button">&laquo; <?php echo smartyTranslate(array('s'=>'Previous'),$_smarty_tpl);?>
</a>
		<input type="submit" name="processPayment" value="<?php echo smartyTranslate(array('s'=>'Next'),$_smarty_tpl);?>
 &raquo;" class="exclusive" />
</p>
<?php }else{ ?>
	</div>
<?php }?>
	</form>
<script>
 jQuery(document).ready(function($){
	var id_bank=jQuery("select[name='id_bankwire'] option:selected" ).val()
		jQuery('.info_details li').each(function(){
		  jQuery('.info_details li').hide();
		  jQuery('.info_details li.info_'+id_bank).show();
		})
		$("select[name='id_bankwire']").change(function() {
		   var id_bank=jQuery("select[name='id_bankwire'] option:selected" ).val()
		jQuery('.info_details li').each(function(){
		  jQuery('.info_details li').hide();
		  jQuery('.info_details li.info_'+id_bank).show();
		})
		});
 })
</script>